
<div class="content">

	<h1> <?php echo $title ;?> </h1>
	<?php 
	$this->load->helper('form');
	$this->load->helper('url');
	echo anchor('professor/','Voltar',array('class'=>'back'));
	
	 if (!isset($registro['matricula']) ){
		echo form_open('professor/criar');
	 }
	else
	{
		 echo form_open('professor/atualizar/'.$registro['matricula']);
		echo form_hidden('matricula_antiga', $registro['matricula']); 
	};  ?>

	<div class="data" style="width: 50%">
		<table>
		<tr>
				<td style="width: 30%"><label >Matricula</label>
				</td>
				<td><?php $options = array('name'=> 'matricula',
              'id'          => 'matricula',
              'maxlength'   => '100',
			  'value' =>@$registro['matricula']);
				echo form_input($options);
				 ?></td>
			</tr>
			<tr>
				<td style="width: 30%"><label >Nome</label>
				</td>
				<td><?php $options = array('name'=> 'Nome',
              'id'          => 'Nome',
              'maxlength'   => '100',
			  'value' =>@$registro['Nome']);
				echo form_input($options); ?></td>
			</tr>

			<tr>
				<td valign="top"><label >Perfil</label>
				</td>
				<td><?php 			
				

echo form_dropdown('perfil_id', $perfil, @$registro['perfil_id']);?>
				</td>
			</tr>
			<tr>
			<td valign="top"> <input type="submit" name="submit" value="<?php echo (!isset($registro['matricula'])) ?  "Cadastrar novo professor" : "Atualizar Professor";?>" />
			</td>
			</tr>
		</table>
		
			
		</div>
		<div class="error" style="width: 78.8%"> <?php echo validation_errors(); ?> </div>		
	</div>

	</form>



